<table class="table table-striped table-bordered table-hover">

    <tr>
        <th width="60" height="40">A&ccedil;&otilde;es</th>
        <th>P&aacute;gina</th>
        <th width="150">Menu</th>
        <th width="150">Perfil de acesso</th>
    </tr>

    <?php
    if (isset($_SESSION['men_id'])) { $onde = "AND item.men_id='{$_SESSION['men_id']}'"; } else { $onde = ""; }
    $sql = "SELECT * FROM item 
    INNER JOIN menu ON menu.men_id=item.men_id
    LEFT JOIN pagina ON pagina.pag_id=item.pag_id
    LEFT JOIN perfil ON perfil.per_id=item.per_id
    WHERE item.sta_id='0' $onde
    ORDER BY item.men_id,item.ite_ordem";
    $res = sql($sql);
    $a = 0;
    while($linha = mysql_fetch_array($res)) {
    ?>

    <tr>
        <td height="40">
            <input name="excluir[]" type="checkbox" value="<?=$linha['ite_id'];?>"/>
        </td>
        <td><?=$linha['pag_nome'].$linha['ite_nome'];?></td>
        <td><b><?=$linha['men_nome'];?></b></td>
        <td><?=$linha['per_nome'];?></td>
    </tr>

    <?
    $a++;
    } 
    ?>
</table>